<%@ Page Language="c#" CodeBehind="EditPost.aspx.cs" MasterPageFile="~/App_MasterPages/layout.Master"
    AutoEventWireup="false" Inherits="ud_Forum.ForumPostEdit" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
    <div class="breadcrumbs forumthreadcrumbs">
        <asp:HyperLink ID="lnkPageCrumb" runat="server" CssClass="unselectedcrumb"></asp:HyperLink>
        &gt; <a href="" id="lnkForum" runat="server"></a>&nbsp;&gt;
        <asp:Label ID="lblThreadDescription" runat="server"></asp:Label>
    </div>
    <portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
        <mp:CornerRounderTop ID="ctop1" runat="server" />
        <asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper forummodule admin forumeditpost">
            <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
                <asp:Panel ID="pnlEdit" runat="server" CssClass="modulecontent" DefaultButton="btnUpdate">
                    <fieldset>
                        <legend>
                            <asp:Literal ID="litForumPostLabel" runat="server" />
                        </legend>
                        <div class="settingrow forumdesc">
                            <asp:Literal ID="litForumDescription" runat="server" />
                        </div>
                        <div class="settingrow">
                            <mp:SiteLabel ID="lblSubjectLabel" runat="server" ForControl="txtSubject" CssClass="settinglabel"
                                ConfigKey="ForumPostEditSubjectLabel" ResourceFile="ForumResources"></mp:SiteLabel>
                            <asp:TextBox ID="txtSubject" runat="server" MaxLength="255" CssClass="verywidetextbox forminput"></asp:TextBox>
                        </div>
                        <div class="settingrow">
                            <mpe:EditorControl ID="edMessage" runat="server">
                            </mpe:EditorControl>
                        </div>
                        <div class="settingrow" id="divSortOrder" runat="server" visible="false">
                            <mp:SiteLabel ID="SiteLabel2" runat="server" ForControl="txtSortOrder" CssClass="settinglabel"
                                ConfigKey="StickySort" ResourceFile="ForumResources" />
                            <asp:TextBox ID="txtSortOrder" runat="server" MaxLength="10" Text="100" CssClass="smalltextbox forminput"></asp:TextBox>
                            <portal:mojoHelpLink ID="MojoHelpLink2" runat="server" HelpKey="forum--post-stickysort-help" />
                        </div>
                        <asp:Panel ID="pnlNotify" runat="server">
                            <div class="settingrow">
                                <mp:SiteLabel ID="lblNotifyOnReply" runat="server" ForControl="chkNotifyOnReply"
                                    CssClass="settinglabel" ConfigKey="ForumPostEditNotifyLabel" ResourceFile="ForumResources">
                                </mp:SiteLabel>
                                <asp:CheckBox ID="chkNotifyOnReply" runat="server" CssClass="forminput"></asp:CheckBox>
                            </div>
                            <div class="settingrow">
                                <mp:SiteLabel ID="SiteLabel1" runat="server" ForControl="chkSubscribeToForum" CssClass="settinglabel"
                                    ConfigKey="SubscribeToAllOfThisForum" ResourceFile="ForumResources"></mp:SiteLabel>
                                <asp:CheckBox ID="chkSubscribeToForum" runat="server" CssClass="forminput"></asp:CheckBox>
                            </div>
                        </asp:Panel>
                        <div class="settingrow">
                            <asp:Label ID="lblError" runat="server" ForeColor="red"></asp:Label>
                            <asp:RequiredFieldValidator ID="reqSubject" runat="server" ControlToValidate="txtSubject"
                                ValidationGroup="Forum" Display="Dynamic"></asp:RequiredFieldValidator>
                        </div>
                        <asp:Panel ID="pnlAntiSpam" runat="server">
                            <mp:CaptchaControl ID="captcha" runat="server" />
                        </asp:Panel>
                        <div class="settingrow">
                            <mp:SiteLabel ID="SiteLabel35" runat="server" CssClass="settinglabel" ConfigKey="spacer" />
                            <div class="forminput">
                                <portal:mojoButton ID="btnUpdate" runat="server" ValidationGroup="Forum" />&nbsp;
                                <portal:mojoButton ID="btnDelete" runat="server" CausesValidation="false" />&nbsp;
                                <asp:HyperLink ID="lnkCancel" runat="server" CssClass="cancellink" />&nbsp;
                            </div>
                        </div>
                    </fieldset>
                    <div class="settingrow">&nbsp;</div>
                    <asp:Repeater ID="rptMessages" runat="server" EnableViewState="False">
                        <ItemTemplate>
                            <div class="forumpostheader">
                                <%# FormatDate(Convert.ToDateTime(Eval("PostDate")))%>
                            </div>
                            <div class="postwrapper">
                                <div class="postleft">
                                    <div class="forumpostusername">
                                        <%# SiteUtils.GetProfileLink(DataBinder.Eval(Container.DataItem,"UserID"),DataBinder.Eval(Container.DataItem,"PostAuthor")) %>
                                    </div>
                                    <div class="forumpostuseravatar">
                                        <%# GetAvatarUrl(DataBinder.Eval(Container.DataItem,"PostAuthorAvatar").ToString()) %>
                                        <portal:Gravatar ID="grav1" runat="server" Email='<%# Eval("AuthorEmail") %>' MaxAllowedRating='<%# MaxAllowedGravatarRating %>'
                                            Visible='<%# allowGravatars %>' />
                                    </div>
                                    <div class="forumpostuserattribute">
                                        <mp:SiteLabel ID="lblTotalPosts" runat="server" ConfigKey="ManageUsersTotalPostsLabel" />
                                        <%# DataBinder.Eval(Container.DataItem,"PostAuthorTotalPosts") %>
                                    </div>
                                    <div class="forumpostuserattribute">
                                        <NeatHtml:UntrustedContent ID="UntrustedContent2" runat="server" TrustedImageUrlPattern='<%# mojoPortal.Web.Framework.SecurityHelper.RegexRelativeImageUrlPatern %>'
                                            ClientScriptUrl="~/ClientScript/NeatHtml.js">
                                            <%# DataBinder.Eval(Container.DataItem, "PostAuthorSignature").ToString()%>
                                        </NeatHtml:UntrustedContent>
                                    </div>
                                    <div class="forumpostuserattribute">
                                        <portal:ForumUserThreadLink ID="lnkUserPosts" runat="server" UserId='<%# GetUserId(DataBinder.Eval(Container.DataItem,"UserID")) %>'
                                            TotalPosts='<%# Convert.ToInt32(DataBinder.Eval(Container.DataItem,"PostAuthorTotalPosts")) %>' />
                                    </div>
                                </div>
                                <div class="postright">
                                    <div class="posttopic">
                                        <h3>
                                            <%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Subject").ToString())%></h3>
                                    </div>
                                    <div class="postbody">
                                        <br />
                                        <NeatHtml:UntrustedContent ID="UntrustedContent1" runat="server" TrustedImageUrlPattern='<%# allowedImageUrlRegexPattern %>'
                                            ClientScriptUrl="~/ClientScript/NeatHtml.js">
                                            <%# DataBinder.Eval(Container.DataItem, "Post").ToString()%>
                                        </NeatHtml:UntrustedContent>
                                    </div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </asp:Panel>
                <asp:HiddenField ID="hdnReturnUrl" runat="server" />
            </portal:mojoPanel>
            <div class="cleared">
            </div>
        </asp:Panel>
        <mp:CornerRounderBottom ID="cbottom1" runat="server" />
    </portal:mojoPanel>
    <portal:SessionKeepAliveControl ID="ka1" runat="server" />
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
